﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B
{
    /// <summary>
    /// 指挥者, 决定调用建造者的哪些步骤，以及顺序（可以控制构建流程）
    /// </summary>
    public class Director
    {
        /// <summary>
        /// 创建产品
        /// </summary>
        /// <returns></returns>
        public Product builder()
        {
            IBuilder builder = new Builder();
            
            builder.BuildPartB();

            builder.BuildPartA();
           
            builder.BuildPartC();

            return builder.GetResult();
        }
    }
}
